package com.zsl.swing.redis.desktop.model;

import com.zsl.swing.redis.desktop.type.BooleanEnum;

public class OtherGeneralConfigEntity {

    /**
     * 展示所有时间一次性scan 条数
     */
    private int showALLScanCount;


    /**
     * 模糊查询时一次性scan条数
     */
    private int queryLikeScanCount;

    /**
     * 模糊删除时一次性scan条数
     */
    private int deleteLikeScanCount;

    /**
     * 界面支持的展示长度
     */
    private long memoryUsageLimit;

    /**
     * 是否格式化展示，1是，0否
     */
    private int formattedDisplay;

    public static OtherGeneralConfigEntity defaultConfig(){
        OtherGeneralConfigEntity config = new OtherGeneralConfigEntity();
        config.setShowALLScanCount(20);
        config.setQueryLikeScanCount(100);
        config.setDeleteLikeScanCount(5000);
        config.setMemoryUsageLimit(32L * 1024L);
        config.setFormattedDisplay(BooleanEnum.TRUE.getCode());
        return config;
    }

    public int getShowALLScanCount() {
        return showALLScanCount;
    }

    public void setShowALLScanCount(int showALLScanCount) {
        this.showALLScanCount = showALLScanCount;
    }

    public int getQueryLikeScanCount() {
        return queryLikeScanCount;
    }

    public void setQueryLikeScanCount(int queryLikeScanCount) {
        this.queryLikeScanCount = queryLikeScanCount;
    }

    public int getDeleteLikeScanCount() {
        return deleteLikeScanCount;
    }

    public void setDeleteLikeScanCount(int deleteLikeScanCount) {
        this.deleteLikeScanCount = deleteLikeScanCount;
    }

    public long getMemoryUsageLimit() {
        return memoryUsageLimit;
    }

    public void setMemoryUsageLimit(long memoryUsageLimit) {
        this.memoryUsageLimit = memoryUsageLimit;
    }

    public int getFormattedDisplay() {
        return formattedDisplay;
    }

    public void setFormattedDisplay(int formattedDisplay) {
        this.formattedDisplay = formattedDisplay;
    }
}
